<?php

// Composer: "fzaninotto/faker": "v1.3.0"
use Faker\Factory as Faker;

class BlogTableSeeder extends Seeder {

	public function run()
	{
		$faker = Faker::create('zh_CN');

		foreach(range(1, 10) as $index)
		{
			Blog::create([
				'user_category_id'=>$faker->numberBetween($min = 1, $max = 9),
				'title'=>$faker->text($maxNbChars = 10),
				'abstracts'=>$faker->text($maxNbChars = 200),
				'content'=>$faker->text,
				'system_category_id'=>$faker->numberBetween($min = 1, $max = 9),
				'blog_type'=>1,
				'origin_url'=>$faker->url,
				'privacy'=>0,
				'deny_comment'=>0,
				'as_top'=>1,
				'user_id'=>$faker->numberBetween($min = 1, $max = 9)
			]);
		}
	}

}